Refer to the document "Mac OS USB Change History" in the Documentation folder for a description of the changes between versions of USB.
This DDK requires that you have Universal Interfaces and Libraries 3.3.1 installed in your development environment. You can obtain these files from the Apple Developer Connection Software Development Kits web page:
<http://developer.apple.com/sdk/>
The two common symptoms that you have not yet installed these files will be:
1. There is a compile time error that the header file "MacErrors.h" could not be found
2. There is a link error that the file HIDLib could not be found.
Both files are included with Universal Interfaces and Libraries 3.3.1.
System Requirements for USB 1.4.6f4
---------------------------------
Apple is formally qualifying USB 1.4.6f4 on the Macintosh systems with built-in USB and with an update to Mac OS 9.0.4 installed. You can also test with Mac OS 9.0 and 9.0.4. Mac OS USB 1.4.6f4 will work with Power Macintosh systems with OHCI-based USB PCI or USB Cardbus cards installed. To test with USB v1.4.6f4, first install Mac OS 9.0.4, then follow the instructions below. Important note: Mac OS USB 1.4.6 will only be available on systems with the update to Mac OS 9.0.4 installed.
USB Fundamentals
----------------
Apple is no longer shipping Macintosh systems with ADB or serial ports. USB is now the primary interface for connecting low- and medium-speed peripheral devices. There are numerous advantages for adopting the USB standard on Macintosh discussed in the "Mac OS USB DDK API Reference Guide."
The DDK provides the tools, interfaces, system software, and module examples for you to start developing USB products for the Macintosh.
Keeping up to date on Mac OS USB
--------------------------------
To stay abreast of changes in Mac OS USB, check out the Mac OS USB Developer web site for the latest information. As updates to Mac OS USB occur, development releases of the software will be made available from this web site. The URL for the web site is:
<http://developer.apple.com/dev/usb>
You can also subscribe to the Mac OS USB Developer mailing list where development questions regarding Mac OS USB are posed and answered. To submit a question to the mailing list you must first be a subscriber. To subscribe to the mailing list, send an email with the subject "subscribe usb" (omit the double quotes) to requests@isg.apple.com.
USB Alerts to developers are always posted to the mailing list. These alerts are also posted to the Mac OS USB Developer Web site at the following location:
To develop with Mac OS USB v1.4.6f4, you will need a Power Macintosh system with USB built in or with a USB PCI adapter installed. This release of Mac OS USB also supports USB Cardbus cards on PowerBook G3 Series systems with Mac OS 9.0.4 or later.
USB v1.4.6f4 will support PCI USB cards from several vendors. However, the enclosed software is for developmental purposes and is not directly supported by Apple, nor is it intended for end-users. End-user customers are encouraged to download the standalone USB Adapter Card Support Installer rather than use the extensions provided in this DDK.
You may find that development on a Power Mac system with a USB PCI card and serial port is easier, as you can use the Power Mac Debugger with a second Power Macintosh system. A Power Macintosh system with ADB keyboard is useful for debugging with Macsbug, since there are cases when the system cannot process keystrokes from a USB keyboard.
Installing the Mac OS USB Software
----------------------------------
Before using the enclosed software on a Macintosh system with built-in USB you must already have Mac OS USB 9.0.4 or later present. If the Mac OS ROM file includes this release of USB, do not install the system extension components from this DDK to the Extensions Folder.
To install the USB System Software components,
1. Remove all files with the following names from your Extensions Folder.
USB Support,
USB Device Extension,
USBCompositeDriver,
USBFamilyExpert,
USBHIDKeyboardModule,
USBHIDMouseModule,
USBHIDUniversalModule,
USBHubDriver0,
USBHubDriver1,
USBOpenHCIDriver,
USBPrintDriver,
USBCommClass,
SerialShimLib,
HID Library,
USB Software Locator,
USB Power Class,
USB Mass Storage Extension,
USB Mass Storage Support
EnetShimLib
2. Drag copy the contents of the folder
:Extensions-AppleBuilt:
to the Extensions folder.
3. Reboot your system after making this modification.
Important Notes on Installation and Use of this DDK software
This DDK will let you look at the sources to some working class drivers, build the examples, and develop and build your own code.
Please remember that these driver samples are copyright Apple Computer, Inc. You may use the supplied code to develop Class Drivers for your devices. As for publishing the source code, please
check first with the Mac OS USB DDK License agreement included in this DDK.
The current driver samples may reflect the latest state of the art of USB driver writing for Mac OS. Note that the PrinterClassModule and the USBSampleStorageDriver samples are for example purpose only. These samples are derived from the shipping drivers: however, we are unable to provide the actual class driver code. The remaining examples are the real code for the Keyboard HID, Mouse HID, Universal HID, and Composite class drivers which ship as part of Mac OS.
While not extensively tested (by the development team), the sample sources have been tweaked slightly to ease the build process when using the Metrowerks Codewarrior IDE. The project files
are provided to help jumpstart your development process.
It is highly recommended that you use one Macintosh for coding purposes and a second (aka "Target") system for checkout/testing purposes.
Using the Mac OS USB DDK under MPW
----------------------------------
For previous releases of the USB DDK, we provided a current UserStartup•USBDDK and makefiles for each of the sample class drivers. As there are very few developers who use the MPW environment for creating USB drivers we no longer provide an MPW UserStartup file or makefiles for the class driver samples.
If MPW is your primary development platform and you need a makefile for one of the example class drivers, submit a request to the Mac OS USB mailing list and a sample makefile, if available for the example, will be sent to you. See the section "Keeping up to date on Mac OS USB" above for information on how to subscribe to the Mac OS USB Developer mailing list.
If you do use MPW, you must update your libraries and Interfaces to Universal Interfaces and Libraries v3.3.1 or later.
Using the Mac OS USB DDK with Metrowerks CodeWarrior
This DDK includes Metrowerks CodeWarrior project files for all of the USB code samples. All of the project files were created using CodeWarrior Pro 1 (IDE 2.0) or later. These project files can also be used with newer versions of CodeWarrior Pro.
The examples require version 3.3.1 of Universal Interfaces and Libraries and may not build using the interfaces and libraries supplied with older versions of CodeWarrior Pro. You can obtain these files from the Apple Developer Connection Software Development Kits web page:
<http://developer.apple.com/sdk/>
The supplied project files will place the built drivers and extensions into the "Extensions-MCWBuilt" folder of the DDK.
Installing the Mac OS USB DDK for CodeWarrior for the First Time